<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;

class BusinessModel extends BaseModel {

    use SoftDeletes;

    protected $table = "business";

    protected $fillable = ['id', 'class_id', 'title', 'content', 'images', 'created_at', 'updated_at', 'deleted_at'];

    public static $columns = ['id', 'class_id', 'title', 'content', 'images', 'created_at', 'updated_at'];

    public function category(){
        return $this->hasOne(CategoryModel::class, 'id', 'class_id');
    }

    protected $casts = [
        'images' => 'array',
    ];
}